import { request } from '@/utils/service'
import type * as Cabinet from '@/api/cabinet/types/cabinet'

export function queryBox(data: Cabinet.queryBoxRequestData) {
  return request<Cabinet.queryBoxResponse>({
    url: '/queryBox',
    method: 'post',
    data
  })
}
export function openDoor(data: Cabinet.openDoorRequestData) {
  return request<Cabinet.openDoorResponse>({
    url: '/openDoor',
    method: 'post',
    data
  })
}
export function queryBoxDetail(data: Cabinet.queryBoxDetailRequestData) {
  return request<Cabinet.queryBoxBoxDetailResponse>({
    url: '/queryBoxDetail',
    method: 'post',
    data
  })
}
export function queryBoxEmployeeOperation(data: Cabinet.queryBoxEmployeeOperationRequestData) {
  return request<Cabinet.queryBoxEmployeeOperationResponse>({
    url: '/queryBoxEmployeeOperation',
    method: 'post',
    data
  })
}
export function queryBoxAlarm(data: Cabinet.queryBoxAlarmRequestData) {
  return request<Cabinet.queryBoxAlarmResponse>({
    url: '/queryBoxAlarm',
    method: 'post',
    data
  })
}
export function queryBoxCustomerOperation(data: Cabinet.queryBoxCustomerOperationRequestData) {
  return request<Cabinet.queryBoxCustomerOperationResponse>({
    url: '/queryBoxCustomerOperation',
    method: 'post',
    data
  })
}
export function queryBatteryHistory(data: Cabinet.queryBatteryHistoryRequestData) {
  return request<Cabinet.queryBatteryHistoryResponse>({
    url: '/changeBatteryHistory',
    method: 'post',
    data
  })
}
export function queryBoxLocations(data: Cabinet.queryBoxLocationsRequestData) {
  return request<Cabinet.queryBoxLocationsResponse>({
    url: '/queryBoxLocations',
    method: 'post',
    data
  })
}
